<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
FastMath (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="FastMath (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FastMath.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/util/Incrementor.html" title="class in org.apache.commons.math3.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/util/FastMath.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FastMath.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.util</FONT>
<BR>
Class FastMath</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.util.FastMath</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>FastMath</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
Faster, more accurate, portable alternative to <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Math.html?is-external=true" title="class or interface in java.lang"><CODE>Math</CODE></A> and
 <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/StrictMath.html?is-external=true" title="class or interface in java.lang"><CODE>StrictMath</CODE></A> for large scale computation.
 <p>
 FastMath is a drop-in replacement for both Math and StrictMath. This
 means that for any method in Math (say <code>Math.sin(x)</code> or
 <code>Math.cbrt(y)</code>), user can directly change the class and use the
 methods as is (using <code>FastMath.sin(x)</code> or <code>FastMath.cbrt(y)</code>
 in the previous example).
 </p>
 <p>
 FastMath speed is achieved by relying heavily on optimizing compilers
 to native code present in many JVMs today and use of large tables.
 The larger tables are lazily initialised on first use, so that the setup
 time does not penalise methods that don't need them.
 </p>
 <p>
 Note that FastMath is
 extensively used inside Apache Commons Math, so by calling some algorithms,
 the overhead when the the tables need to be intialised will occur
 regardless of the end-user calling FastMath methods directly or not.
 Performance figures for a specific JVM and hardware can be evaluated by
 running the FastMathTestPerformance tests in the test directory of the source
 distribution.
 </p>
 <p>
 FastMath accuracy should be mostly independent of the JVM as it relies only
 on IEEE-754 basic operations and on embedded tables. Almost all operations
 are accurate to about 0.5 ulp throughout the domain range. This statement,
 of course is only a rough global observed behavior, it is <em>not</em> a
 guarantee for <em>every</em> double numbers input (see William Kahan's <a
 href="http://en.wikipedia.org/wiki/Rounding#The_table-maker.27s_dilemma">Table
 Maker's Dilemma</a>).
 </p>
 <p>
 FastMath additionally implements the following methods not found in Math/StrictMath:
 <ul>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#asinh(double)"><CODE>asinh(double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#acosh(double)"><CODE>acosh(double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#atanh(double)"><CODE>atanh(double)</CODE></A></li>
 </ul>
 The following methods are found in Math/StrictMath since 1.6 only, they are provided
 by FastMath even in 1.5 Java virtual machines
 <ul>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#copySign(double, double)"><CODE>copySign(double, double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#getExponent(double)"><CODE>getExponent(double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextAfter(double, double)"><CODE>nextAfter(double,double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextUp(double)"><CODE>nextUp(double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#scalb(double, int)"><CODE>scalb(double, int)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#copySign(float, float)"><CODE>copySign(float, float)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#getExponent(float)"><CODE>getExponent(float)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextAfter(float, double)"><CODE>nextAfter(float,double)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextUp(float)"><CODE>nextUp(float)</CODE></A></li>
 <li><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#scalb(float, int)"><CODE>scalb(float, int)</CODE></A></li>
 </ul>
 </p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>2.2</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: FastMath.java 1462503 2013-03-29 15:48:27Z luc $</DD>
</DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#E">E</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Napier's constant e, base of the natural logarithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#PI">PI</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Archimede's constant PI, ratio of circle circumference to diameter.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#abs(double)">abs</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Absolute value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#abs(float)">abs</A></B>(float&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Absolute value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#abs(int)">abs</A></B>(int&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Absolute value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#abs(long)">abs</A></B>(long&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Absolute value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#acos(double)">acos</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the arc cosine of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#acosh(double)">acosh</A></B>(double&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the inverse hyperbolic cosine of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#asin(double)">asin</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the arc sine of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#asinh(double)">asinh</A></B>(double&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the inverse hyperbolic sine of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#atan(double)">atan</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Arctangent function</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#atan2(double, double)">atan2</A></B>(double&nbsp;y,
      double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Two arguments arctangent function</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#atanh(double)">atanh</A></B>(double&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the inverse hyperbolic tangent of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#cbrt(double)">cbrt</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the cubic root of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#ceil(double)">ceil</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the smallest whole number larger than x.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#copySign(double, double)">copySign</A></B>(double&nbsp;magnitude,
         double&nbsp;sign)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first argument with the sign of the second argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#copySign(float, float)">copySign</A></B>(float&nbsp;magnitude,
         float&nbsp;sign)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first argument with the sign of the second argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#cos(double)">cos</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cosine function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#cosh(double)">cosh</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the hyperbolic cosine of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#exp(double)">exp</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exponential function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#expm1(double)">expm1</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute exp(x) - 1</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#floor(double)">floor</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the largest whole number smaller than x.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#getExponent(double)">getExponent</A></B>(double&nbsp;d)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the exponent of a double number, removing the bias.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#getExponent(float)">getExponent</A></B>(float&nbsp;f)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the exponent of a float number, removing the bias.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#hypot(double, double)">hypot</A></B>(double&nbsp;x,
      double&nbsp;y)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the hypotenuse of a triangle with sides <code>x</code> and <code>y</code>
 - sqrt(<i>x</i><sup>2</sup>&nbsp;+<i>y</i><sup>2</sup>)<br/>
 avoiding intermediate overflow or underflow.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#IEEEremainder(double, double)">IEEEremainder</A></B>(double&nbsp;dividend,
              double&nbsp;divisor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the remainder as prescribed by the IEEE 754 standard.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#log(double)">log</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Natural logarithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#log(double, double)">log</A></B>(double&nbsp;base,
    double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the <a href="http://mathworld.wolfram.com/Logarithm.html">
 logarithm</a> in a given base.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#log10(double)">log10</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the base 10 logarithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#log1p(double)">log1p</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes log(1 + x).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#main(java.lang.String[])">main</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print out contents of arrays, and check the length.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#max(double, double)">max</A></B>(double&nbsp;a,
    double&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the maximum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#max(float, float)">max</A></B>(float&nbsp;a,
    float&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the maximum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#max(int, int)">max</A></B>(int&nbsp;a,
    int&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the maximum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#max(long, long)">max</A></B>(long&nbsp;a,
    long&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the maximum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#min(double, double)">min</A></B>(double&nbsp;a,
    double&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the minimum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#min(float, float)">min</A></B>(float&nbsp;a,
    float&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the minimum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#min(int, int)">min</A></B>(int&nbsp;a,
    int&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the minimum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#min(long, long)">min</A></B>(long&nbsp;a,
    long&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the minimum of two values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextAfter(double, double)">nextAfter</A></B>(double&nbsp;d,
          double&nbsp;direction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the next machine representable number after a number, moving
 in the direction of another number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextAfter(float, double)">nextAfter</A></B>(float&nbsp;f,
          double&nbsp;direction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the next machine representable number after a number, moving
 in the direction of another number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextUp(double)">nextUp</A></B>(double&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute next number towards positive infinity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#nextUp(float)">nextUp</A></B>(float&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute next number towards positive infinity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#pow(double, double)">pow</A></B>(double&nbsp;x,
    double&nbsp;y)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Power function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#pow(double, int)">pow</A></B>(double&nbsp;d,
    int&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Raise a double to an int power.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#random()">random</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a pseudo-random number between 0.0 and 1.0.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#rint(double)">rint</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the whole number that is the nearest to x, or the even one if x is exactly half way between two integers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#round(double)">round</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the closest long to x.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#round(float)">round</A></B>(float&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the closest int to x.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#scalb(double, int)">scalb</A></B>(double&nbsp;d,
      int&nbsp;n)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiply a double number by a power of 2.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#scalb(float, int)">scalb</A></B>(float&nbsp;f,
      int&nbsp;n)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiply a float number by a power of 2.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#signum(double)">signum</A></B>(double&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the signum of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#signum(float)">signum</A></B>(float&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the signum of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#sin(double)">sin</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sine function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#sinh(double)">sinh</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the hyperbolic sine of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#sqrt(double)">sqrt</A></B>(double&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the square root of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#tan(double)">tan</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tangent function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#tanh(double)">tanh</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the hyperbolic tangent of a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#toDegrees(double)">toDegrees</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert radians to degrees, with error of less than 0.5 ULP</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#toRadians(double)">toRadians</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert degrees to radians, with error of less than 0.5 ULP</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#ulp(double)">ulp</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute least significant bit (Unit in Last Position) for a number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/util/FastMath.html#ulp(float)">ulp</A></B>(float&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute least significant bit (Unit in Last Position) for a number.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="PI"><!-- --></A><H3>
PI</H3>
<PRE>
public static final double <B>PI</B></PRE>
<DL>
<DD>Archimede's constant PI, ratio of circle circumference to diameter.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.math3.util.FastMath.PI">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="E"><!-- --></A><H3>
E</H3>
<PRE>
public static final double <B>E</B></PRE>
<DL>
<DD>Napier's constant e, base of the natural logarithm.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.math3.util.FastMath.E">Constant Field Values</A></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="sqrt(double)"><!-- --></A><H3>
sqrt</H3>
<PRE>
public static double <B>sqrt</B>(double&nbsp;a)</PRE>
<DL>
<DD>Compute the square root of a number.
 <p><b>Note:</b> this implementation currently delegates to <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Math.html?is-external=true#sqrt(double)" title="class or interface in java.lang"><CODE>Math.sqrt(double)</CODE></A>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>square root of a</DL>
</DD>
</DL>
<HR>

<A NAME="cosh(double)"><!-- --></A><H3>
cosh</H3>
<PRE>
public static double <B>cosh</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the hyperbolic cosine of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>hyperbolic cosine of x</DL>
</DD>
</DL>
<HR>

<A NAME="sinh(double)"><!-- --></A><H3>
sinh</H3>
<PRE>
public static double <B>sinh</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the hyperbolic sine of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>hyperbolic sine of x</DL>
</DD>
</DL>
<HR>

<A NAME="tanh(double)"><!-- --></A><H3>
tanh</H3>
<PRE>
public static double <B>tanh</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the hyperbolic tangent of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>hyperbolic tangent of x</DL>
</DD>
</DL>
<HR>

<A NAME="acosh(double)"><!-- --></A><H3>
acosh</H3>
<PRE>
public static double <B>acosh</B>(double&nbsp;a)</PRE>
<DL>
<DD>Compute the inverse hyperbolic cosine of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>inverse hyperbolic cosine of a</DL>
</DD>
</DL>
<HR>

<A NAME="asinh(double)"><!-- --></A><H3>
asinh</H3>
<PRE>
public static double <B>asinh</B>(double&nbsp;a)</PRE>
<DL>
<DD>Compute the inverse hyperbolic sine of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>inverse hyperbolic sine of a</DL>
</DD>
</DL>
<HR>

<A NAME="atanh(double)"><!-- --></A><H3>
atanh</H3>
<PRE>
public static double <B>atanh</B>(double&nbsp;a)</PRE>
<DL>
<DD>Compute the inverse hyperbolic tangent of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>inverse hyperbolic tangent of a</DL>
</DD>
</DL>
<HR>

<A NAME="signum(double)"><!-- --></A><H3>
signum</H3>
<PRE>
public static double <B>signum</B>(double&nbsp;a)</PRE>
<DL>
<DD>Compute the signum of a number.
 The signum is -1 for negative numbers, +1 for positive numbers and 0 otherwise
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>-1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a</DL>
</DD>
</DL>
<HR>

<A NAME="signum(float)"><!-- --></A><H3>
signum</H3>
<PRE>
public static float <B>signum</B>(float&nbsp;a)</PRE>
<DL>
<DD>Compute the signum of a number.
 The signum is -1 for negative numbers, +1 for positive numbers and 0 otherwise
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>-1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a</DL>
</DD>
</DL>
<HR>

<A NAME="nextUp(double)"><!-- --></A><H3>
nextUp</H3>
<PRE>
public static double <B>nextUp</B>(double&nbsp;a)</PRE>
<DL>
<DD>Compute next number towards positive infinity.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number to which neighbor should be computed
<DT><B>Returns:</B><DD>neighbor of a towards positive infinity</DL>
</DD>
</DL>
<HR>

<A NAME="nextUp(float)"><!-- --></A><H3>
nextUp</H3>
<PRE>
public static float <B>nextUp</B>(float&nbsp;a)</PRE>
<DL>
<DD>Compute next number towards positive infinity.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - number to which neighbor should be computed
<DT><B>Returns:</B><DD>neighbor of a towards positive infinity</DL>
</DD>
</DL>
<HR>

<A NAME="random()"><!-- --></A><H3>
random</H3>
<PRE>
public static double <B>random</B>()</PRE>
<DL>
<DD>Returns a pseudo-random number between 0.0 and 1.0.
 <p><b>Note:</b> this implementation currently delegates to <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Math.html?is-external=true#random()" title="class or interface in java.lang"><CODE>Math.random()</CODE></A>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a random number between 0.0 and 1.0</DL>
</DD>
</DL>
<HR>

<A NAME="exp(double)"><!-- --></A><H3>
exp</H3>
<PRE>
public static double <B>exp</B>(double&nbsp;x)</PRE>
<DL>
<DD>Exponential function.

 Computes exp(x), function result is nearly rounded.   It will be correctly
 rounded to the theoretical value for 99.9% of input values, otherwise it will
 have a 1 UPL error.

 Method:
    Lookup intVal = exp(int(x))
    Lookup fracVal = exp(int(x-int(x) / 1024.0) * 1024.0 );
    Compute z as the exponential of the remaining bits by a polynomial minus one
    exp(x) = intVal * fracVal * (1 + z)

 Accuracy:
    Calculation is done with 63 bits of precision, so result should be correctly
    rounded for 99.9% of input values, with less than 1 ULP error otherwise.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - a double
<DT><B>Returns:</B><DD>double e<sup>x</sup></DL>
</DD>
</DL>
<HR>

<A NAME="expm1(double)"><!-- --></A><H3>
expm1</H3>
<PRE>
public static double <B>expm1</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute exp(x) - 1
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number to compute shifted exponential
<DT><B>Returns:</B><DD>exp(x) - 1</DL>
</DD>
</DL>
<HR>

<A NAME="log(double)"><!-- --></A><H3>
log</H3>
<PRE>
public static double <B>log</B>(double&nbsp;x)</PRE>
<DL>
<DD>Natural logarithm.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - a double
<DT><B>Returns:</B><DD>log(x)</DL>
</DD>
</DL>
<HR>

<A NAME="log1p(double)"><!-- --></A><H3>
log1p</H3>
<PRE>
public static double <B>log1p</B>(double&nbsp;x)</PRE>
<DL>
<DD>Computes log(1 + x).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - Number.
<DT><B>Returns:</B><DD><code>log(1 + x)</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="log10(double)"><!-- --></A><H3>
log10</H3>
<PRE>
public static double <B>log10</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the base 10 logarithm.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - a number
<DT><B>Returns:</B><DD>log10(x)</DL>
</DD>
</DL>
<HR>

<A NAME="log(double, double)"><!-- --></A><H3>
log</H3>
<PRE>
public static double <B>log</B>(double&nbsp;base,
                         double&nbsp;x)</PRE>
<DL>
<DD>Computes the <a href="http://mathworld.wolfram.com/Logarithm.html">
 logarithm</a> in a given base.

 Returns <code>NaN</code> if either argument is negative.
 If <code>base</code> is 0 and <code>x</code> is positive, 0 is returned.
 If <code>base</code> is positive and <code>x</code> is 0,
 <code>Double.NEGATIVE_INFINITY</code> is returned.
 If both arguments are 0, the result is <code>NaN</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>base</CODE> - Base of the logarithm, must be greater than 0.<DD><CODE>x</CODE> - Argument, must be greater than 0.
<DT><B>Returns:</B><DD>the value of the logarithm, i.e. the number <code>y</code> such that
 <code>base<sup>y</sup> = x</code>.<DT><B>Since:</B></DT>
  <DD>1.2 (previously in <code>MathUtils</code>, moved as of version 3.0)</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="pow(double, double)"><!-- --></A><H3>
pow</H3>
<PRE>
public static double <B>pow</B>(double&nbsp;x,
                         double&nbsp;y)</PRE>
<DL>
<DD>Power function.  Compute x^y.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - a double<DD><CODE>y</CODE> - a double
<DT><B>Returns:</B><DD>double</DL>
</DD>
</DL>
<HR>

<A NAME="pow(double, int)"><!-- --></A><H3>
pow</H3>
<PRE>
public static double <B>pow</B>(double&nbsp;d,
                         int&nbsp;e)</PRE>
<DL>
<DD>Raise a double to an int power.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - Number to raise.<DD><CODE>e</CODE> - Exponent.
<DT><B>Returns:</B><DD>d<sup>e</sup><DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="sin(double)"><!-- --></A><H3>
sin</H3>
<PRE>
public static double <B>sin</B>(double&nbsp;x)</PRE>
<DL>
<DD>Sine function.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - Argument.
<DT><B>Returns:</B><DD>sin(x)</DL>
</DD>
</DL>
<HR>

<A NAME="cos(double)"><!-- --></A><H3>
cos</H3>
<PRE>
public static double <B>cos</B>(double&nbsp;x)</PRE>
<DL>
<DD>Cosine function.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - Argument.
<DT><B>Returns:</B><DD>cos(x)</DL>
</DD>
</DL>
<HR>

<A NAME="tan(double)"><!-- --></A><H3>
tan</H3>
<PRE>
public static double <B>tan</B>(double&nbsp;x)</PRE>
<DL>
<DD>Tangent function.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - Argument.
<DT><B>Returns:</B><DD>tan(x)</DL>
</DD>
</DL>
<HR>

<A NAME="atan(double)"><!-- --></A><H3>
atan</H3>
<PRE>
public static double <B>atan</B>(double&nbsp;x)</PRE>
<DL>
<DD>Arctangent function
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - a number
<DT><B>Returns:</B><DD>atan(x)</DL>
</DD>
</DL>
<HR>

<A NAME="atan2(double, double)"><!-- --></A><H3>
atan2</H3>
<PRE>
public static double <B>atan2</B>(double&nbsp;y,
                           double&nbsp;x)</PRE>
<DL>
<DD>Two arguments arctangent function
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>y</CODE> - ordinate<DD><CODE>x</CODE> - abscissa
<DT><B>Returns:</B><DD>phase angle of point (x,y) between <code>-PI</code> and <code>PI</code></DL>
</DD>
</DL>
<HR>

<A NAME="asin(double)"><!-- --></A><H3>
asin</H3>
<PRE>
public static double <B>asin</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the arc sine of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>arc sine of x</DL>
</DD>
</DL>
<HR>

<A NAME="acos(double)"><!-- --></A><H3>
acos</H3>
<PRE>
public static double <B>acos</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the arc cosine of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>arc cosine of x</DL>
</DD>
</DL>
<HR>

<A NAME="cbrt(double)"><!-- --></A><H3>
cbrt</H3>
<PRE>
public static double <B>cbrt</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the cubic root of a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number on which evaluation is done
<DT><B>Returns:</B><DD>cubic root of x</DL>
</DD>
</DL>
<HR>

<A NAME="toRadians(double)"><!-- --></A><H3>
toRadians</H3>
<PRE>
public static double <B>toRadians</B>(double&nbsp;x)</PRE>
<DL>
<DD>Convert degrees to radians, with error of less than 0.5 ULP
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - angle in degrees
<DT><B>Returns:</B><DD>x converted into radians</DL>
</DD>
</DL>
<HR>

<A NAME="toDegrees(double)"><!-- --></A><H3>
toDegrees</H3>
<PRE>
public static double <B>toDegrees</B>(double&nbsp;x)</PRE>
<DL>
<DD>Convert radians to degrees, with error of less than 0.5 ULP
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - angle in radians
<DT><B>Returns:</B><DD>x converted into degrees</DL>
</DD>
</DL>
<HR>

<A NAME="abs(int)"><!-- --></A><H3>
abs</H3>
<PRE>
public static int <B>abs</B>(int&nbsp;x)</PRE>
<DL>
<DD>Absolute value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which absolute value is requested
<DT><B>Returns:</B><DD>abs(x)</DL>
</DD>
</DL>
<HR>

<A NAME="abs(long)"><!-- --></A><H3>
abs</H3>
<PRE>
public static long <B>abs</B>(long&nbsp;x)</PRE>
<DL>
<DD>Absolute value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which absolute value is requested
<DT><B>Returns:</B><DD>abs(x)</DL>
</DD>
</DL>
<HR>

<A NAME="abs(float)"><!-- --></A><H3>
abs</H3>
<PRE>
public static float <B>abs</B>(float&nbsp;x)</PRE>
<DL>
<DD>Absolute value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which absolute value is requested
<DT><B>Returns:</B><DD>abs(x)</DL>
</DD>
</DL>
<HR>

<A NAME="abs(double)"><!-- --></A><H3>
abs</H3>
<PRE>
public static double <B>abs</B>(double&nbsp;x)</PRE>
<DL>
<DD>Absolute value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which absolute value is requested
<DT><B>Returns:</B><DD>abs(x)</DL>
</DD>
</DL>
<HR>

<A NAME="ulp(double)"><!-- --></A><H3>
ulp</H3>
<PRE>
public static double <B>ulp</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute least significant bit (Unit in Last Position) for a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which ulp is requested
<DT><B>Returns:</B><DD>ulp(x)</DL>
</DD>
</DL>
<HR>

<A NAME="ulp(float)"><!-- --></A><H3>
ulp</H3>
<PRE>
public static float <B>ulp</B>(float&nbsp;x)</PRE>
<DL>
<DD>Compute least significant bit (Unit in Last Position) for a number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which ulp is requested
<DT><B>Returns:</B><DD>ulp(x)</DL>
</DD>
</DL>
<HR>

<A NAME="scalb(double, int)"><!-- --></A><H3>
scalb</H3>
<PRE>
public static double <B>scalb</B>(double&nbsp;d,
                           int&nbsp;n)</PRE>
<DL>
<DD>Multiply a double number by a power of 2.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - number to multiply<DD><CODE>n</CODE> - power of 2
<DT><B>Returns:</B><DD>d &times; 2<sup>n</sup></DL>
</DD>
</DL>
<HR>

<A NAME="scalb(float, int)"><!-- --></A><H3>
scalb</H3>
<PRE>
public static float <B>scalb</B>(float&nbsp;f,
                          int&nbsp;n)</PRE>
<DL>
<DD>Multiply a float number by a power of 2.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - number to multiply<DD><CODE>n</CODE> - power of 2
<DT><B>Returns:</B><DD>f &times; 2<sup>n</sup></DL>
</DD>
</DL>
<HR>

<A NAME="nextAfter(double, double)"><!-- --></A><H3>
nextAfter</H3>
<PRE>
public static double <B>nextAfter</B>(double&nbsp;d,
                               double&nbsp;direction)</PRE>
<DL>
<DD>Get the next machine representable number after a number, moving
 in the direction of another number.
 <p>
 The ordering is as follows (increasing):
 <ul>
 <li>-INFINITY</li>
 <li>-MAX_VALUE</li>
 <li>-MIN_VALUE</li>
 <li>-0.0</li>
 <li>+0.0</li>
 <li>+MIN_VALUE</li>
 <li>+MAX_VALUE</li>
 <li>+INFINITY</li>
 <li></li>
 <p>
 If arguments compare equal, then the second argument is returned.
 <p>
 If <code>direction</code> is greater than <code>d</code>,
 the smallest machine representable number strictly greater than
 <code>d</code> is returned; if less, then the largest representable number
 strictly less than <code>d</code> is returned.</p>
 <p>
 If <code>d</code> is infinite and direction does not
 bring it back to finite numbers, it is returned unchanged.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - base number<DD><CODE>direction</CODE> - (the only important thing is whether
 <code>direction</code> is greater or smaller than <code>d</code>)
<DT><B>Returns:</B><DD>the next machine representable number in the specified direction</DL>
</DD>
</DL>
<HR>

<A NAME="nextAfter(float, double)"><!-- --></A><H3>
nextAfter</H3>
<PRE>
public static float <B>nextAfter</B>(float&nbsp;f,
                              double&nbsp;direction)</PRE>
<DL>
<DD>Get the next machine representable number after a number, moving
 in the direction of another number.
 <p>
 The ordering is as follows (increasing):
 <ul>
 <li>-INFINITY</li>
 <li>-MAX_VALUE</li>
 <li>-MIN_VALUE</li>
 <li>-0.0</li>
 <li>+0.0</li>
 <li>+MIN_VALUE</li>
 <li>+MAX_VALUE</li>
 <li>+INFINITY</li>
 <li></li>
 <p>
 If arguments compare equal, then the second argument is returned.
 <p>
 If <code>direction</code> is greater than <code>f</code>,
 the smallest machine representable number strictly greater than
 <code>f</code> is returned; if less, then the largest representable number
 strictly less than <code>f</code> is returned.</p>
 <p>
 If <code>f</code> is infinite and direction does not
 bring it back to finite numbers, it is returned unchanged.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - base number<DD><CODE>direction</CODE> - (the only important thing is whether
 <code>direction</code> is greater or smaller than <code>f</code>)
<DT><B>Returns:</B><DD>the next machine representable number in the specified direction</DL>
</DD>
</DL>
<HR>

<A NAME="floor(double)"><!-- --></A><H3>
floor</H3>
<PRE>
public static double <B>floor</B>(double&nbsp;x)</PRE>
<DL>
<DD>Get the largest whole number smaller than x.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which floor is requested
<DT><B>Returns:</B><DD>a double number f such that f is an integer f <= x < f + 1.0</DL>
</DD>
</DL>
<HR>

<A NAME="ceil(double)"><!-- --></A><H3>
ceil</H3>
<PRE>
public static double <B>ceil</B>(double&nbsp;x)</PRE>
<DL>
<DD>Get the smallest whole number larger than x.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which ceil is requested
<DT><B>Returns:</B><DD>a double number c such that c is an integer c - 1.0 < x <= c</DL>
</DD>
</DL>
<HR>

<A NAME="rint(double)"><!-- --></A><H3>
rint</H3>
<PRE>
public static double <B>rint</B>(double&nbsp;x)</PRE>
<DL>
<DD>Get the whole number that is the nearest to x, or the even one if x is exactly half way between two integers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which nearest whole number is requested
<DT><B>Returns:</B><DD>a double number r such that r is an integer r - 0.5 <= x <= r + 0.5</DL>
</DD>
</DL>
<HR>

<A NAME="round(double)"><!-- --></A><H3>
round</H3>
<PRE>
public static long <B>round</B>(double&nbsp;x)</PRE>
<DL>
<DD>Get the closest long to x.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which closest long is requested
<DT><B>Returns:</B><DD>closest long to x</DL>
</DD>
</DL>
<HR>

<A NAME="round(float)"><!-- --></A><H3>
round</H3>
<PRE>
public static int <B>round</B>(float&nbsp;x)</PRE>
<DL>
<DD>Get the closest int to x.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - number from which closest int is requested
<DT><B>Returns:</B><DD>closest int to x</DL>
</DD>
</DL>
<HR>

<A NAME="min(int, int)"><!-- --></A><H3>
min</H3>
<PRE>
public static int <B>min</B>(int&nbsp;a,
                      int&nbsp;b)</PRE>
<DL>
<DD>Compute the minimum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>a if a is lesser or equal to b, b otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="min(long, long)"><!-- --></A><H3>
min</H3>
<PRE>
public static long <B>min</B>(long&nbsp;a,
                       long&nbsp;b)</PRE>
<DL>
<DD>Compute the minimum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>a if a is lesser or equal to b, b otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="min(float, float)"><!-- --></A><H3>
min</H3>
<PRE>
public static float <B>min</B>(float&nbsp;a,
                        float&nbsp;b)</PRE>
<DL>
<DD>Compute the minimum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>a if a is lesser or equal to b, b otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="min(double, double)"><!-- --></A><H3>
min</H3>
<PRE>
public static double <B>min</B>(double&nbsp;a,
                         double&nbsp;b)</PRE>
<DL>
<DD>Compute the minimum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>a if a is lesser or equal to b, b otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="max(int, int)"><!-- --></A><H3>
max</H3>
<PRE>
public static int <B>max</B>(int&nbsp;a,
                      int&nbsp;b)</PRE>
<DL>
<DD>Compute the maximum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>b if a is lesser or equal to b, a otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="max(long, long)"><!-- --></A><H3>
max</H3>
<PRE>
public static long <B>max</B>(long&nbsp;a,
                       long&nbsp;b)</PRE>
<DL>
<DD>Compute the maximum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>b if a is lesser or equal to b, a otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="max(float, float)"><!-- --></A><H3>
max</H3>
<PRE>
public static float <B>max</B>(float&nbsp;a,
                        float&nbsp;b)</PRE>
<DL>
<DD>Compute the maximum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>b if a is lesser or equal to b, a otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="max(double, double)"><!-- --></A><H3>
max</H3>
<PRE>
public static double <B>max</B>(double&nbsp;a,
                         double&nbsp;b)</PRE>
<DL>
<DD>Compute the maximum of two values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - first value<DD><CODE>b</CODE> - second value
<DT><B>Returns:</B><DD>b if a is lesser or equal to b, a otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="hypot(double, double)"><!-- --></A><H3>
hypot</H3>
<PRE>
public static double <B>hypot</B>(double&nbsp;x,
                           double&nbsp;y)</PRE>
<DL>
<DD>Returns the hypotenuse of a triangle with sides <code>x</code> and <code>y</code>
 - sqrt(<i>x</i><sup>2</sup>&nbsp;+<i>y</i><sup>2</sup>)<br/>
 avoiding intermediate overflow or underflow.

 <ul>
 <li> If either argument is infinite, then the result is positive infinity.</li>
 <li> else, if either argument is NaN then the result is NaN.</li>
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - a value<DD><CODE>y</CODE> - a value
<DT><B>Returns:</B><DD>sqrt(<i>x</i><sup>2</sup>&nbsp;+<i>y</i><sup>2</sup>)</DL>
</DD>
</DL>
<HR>

<A NAME="IEEEremainder(double, double)"><!-- --></A><H3>
IEEEremainder</H3>
<PRE>
public static double <B>IEEEremainder</B>(double&nbsp;dividend,
                                   double&nbsp;divisor)</PRE>
<DL>
<DD>Computes the remainder as prescribed by the IEEE 754 standard.
 The remainder value is mathematically equal to <code>x - y*n</code>
 where <code>n</code> is the mathematical integer closest to the exact mathematical value
 of the quotient <code>x/y</code>.
 If two mathematical integers are equally close to <code>x/y</code> then
 <code>n</code> is the integer that is even.
 <p>
 <ul>
 <li>If either operand is NaN, the result is NaN.</li>
 <li>If the result is not NaN, the sign of the result equals the sign of the dividend.</li>
 <li>If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.</li>
 <li>If the dividend is finite and the divisor is an infinity, the result equals the dividend.</li>
 <li>If the dividend is a zero and the divisor is finite, the result equals the dividend.</li>
 </ul>
 <p><b>Note:</b> this implementation currently delegates to <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/StrictMath.html?is-external=true#IEEEremainder(double, double)" title="class or interface in java.lang"><CODE>StrictMath.IEEEremainder(double, double)</CODE></A>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dividend</CODE> - the number to be divided<DD><CODE>divisor</CODE> - the number by which to divide
<DT><B>Returns:</B><DD>the remainder, rounded</DL>
</DD>
</DL>
<HR>

<A NAME="copySign(double, double)"><!-- --></A><H3>
copySign</H3>
<PRE>
public static double <B>copySign</B>(double&nbsp;magnitude,
                              double&nbsp;sign)</PRE>
<DL>
<DD>Returns the first argument with the sign of the second argument.
 A NaN <code>sign</code> argument is treated as positive.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>magnitude</CODE> - the value to return<DD><CODE>sign</CODE> - the sign for the returned value
<DT><B>Returns:</B><DD>the magnitude with the same sign as the <code>sign</code> argument</DL>
</DD>
</DL>
<HR>

<A NAME="copySign(float, float)"><!-- --></A><H3>
copySign</H3>
<PRE>
public static float <B>copySign</B>(float&nbsp;magnitude,
                             float&nbsp;sign)</PRE>
<DL>
<DD>Returns the first argument with the sign of the second argument.
 A NaN <code>sign</code> argument is treated as positive.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>magnitude</CODE> - the value to return<DD><CODE>sign</CODE> - the sign for the returned value
<DT><B>Returns:</B><DD>the magnitude with the same sign as the <code>sign</code> argument</DL>
</DD>
</DL>
<HR>

<A NAME="getExponent(double)"><!-- --></A><H3>
getExponent</H3>
<PRE>
public static int <B>getExponent</B>(double&nbsp;d)</PRE>
<DL>
<DD>Return the exponent of a double number, removing the bias.
 <p>
 For double numbers of the form 2<sup>x</sup>, the unbiased
 exponent is exactly x.
 </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - number from which exponent is requested
<DT><B>Returns:</B><DD>exponent for d in IEEE754 representation, without bias</DL>
</DD>
</DL>
<HR>

<A NAME="getExponent(float)"><!-- --></A><H3>
getExponent</H3>
<PRE>
public static int <B>getExponent</B>(float&nbsp;f)</PRE>
<DL>
<DD>Return the exponent of a float number, removing the bias.
 <p>
 For float numbers of the form 2<sup>x</sup>, the unbiased
 exponent is exactly x.
 </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - number from which exponent is requested
<DT><B>Returns:</B><DD>exponent for d in IEEE754 representation, without bias</DL>
</DD>
</DL>
<HR>

<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;a)</PRE>
<DL>
<DD>Print out contents of arrays, and check the length.
 <p>used to generate the preset arrays originally.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - unused</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FastMath.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/util/Incrementor.html" title="class in org.apache.commons.math3.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/util/FastMath.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FastMath.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
